package com.wch.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.wch.service.EmpService;
import com.wch.util.NoteResult;

@Controller
@RequestMapping("/emp")
public class EmpLoginController {

    @Autowired
    private EmpService service;

    @RequestMapping("/login.do")
    @ResponseBody
    public NoteResult execute(String ename,String pwd){
        NoteResult result =
                service.findByName(ename,pwd);
        return result;
    }
}
